package com.future.dao;

import java.util.List;

import com.future.model.po.InformationModel;

public class InformationDAO extends BaseDAO<InformationModel> {
	public List<InformationModel> findAll() {
		String sql = "select * from information ";
		return this.searchAsBeanList(sql, InformationModel.class);
	}

	public List<InformationModel> findByDeptId(Integer deptId) {
		String sql = "select * from information where deptid = ? ";
		return this.searchAsBeanList(sql, InformationModel.class, deptId);
	}

	public boolean save(InformationModel model) {
		String sql = "insert into information (deptid , information) values (?,?)";
		return this.update(sql, model.getDeptid(), model.getInformation());
	}
}
